MultiCAN or More Homers on CAN Bus
Theoretically, up to 20 Homers can be connected simultaneously to the CAN Bus and controlled independently by a single HomSoft application. The following conditions must be satisfied:
-
All Homers must be set to the same CAN baudrate (see Can.cfg in Configuring Communication).
-
Each Homer must be assigned a unique number, called a CAN Address, ranging from 1 to 20. The assignment is made by the following statement in its internal Hom.cfg configuration file (the example below assigns the Homer a CAN Address 4):
CAN_ADDR=4
Note that the Hom.cfg and Can.cfg files reside inside each Homer. The files can be transferred from a Homer to your PC, edited, and sent back to the Homer: please refer to Transferring Files for details.
Caution! You must ensure that no two Homers are assigned the same CAN Address. This would lead to unpredictable behavior because such Homers cannot be distinguished. Aside from being unique, the addresses may be arbitrary. Example: If N = 4 Homers are on the bus, the addresses may be, e.g., 7, 11, 2, 4, or 1, 2, 5, 6, or 1, 2, 3, 4, etc.
-
A HomerList.cfg configuration file, containing a list of Homer CAN Addresses, must be present in the User Folder on your PC (please do not confuse the HomerList.cfg file on your PC with the Hom.cfg file residing inside a Homer device).
HomerList Configuration File
To control a group of Homers by a single HomSoft application, a HomerList.cfg configuration file, containing a list of CAN Addresses of these Homers, must be present in User Folder on your PC. (Please do not confuse the HomerList.cfg file in the PC with the Hom.cfg file residing inside of each individual Homer device.) If the HomerList.cfg file is absent, HomSoft will search for only one Homer: the one with CAN Address = 1.
A HOMER_LIST statement must be present in the HomerList.cfg file, listing the addresses of Homers the program will search for. For example:
HOMER_LIST=2 15 4 1 7
The CAN Address numbers follow the equality sign (=) and must be mutually separated by one or more spaces or Tab characters. The valid addresses are numbers ranging from 1 to 20; they may appear in any order.
The search will be performed in the order of appearance of the addresses.
Because an attempt to detect a nonexistent Homer takes about 10 seconds, time can be saved if HOMER_LIST exactly reflects the CAN Addresses of the Homers on the bus.
A special statement form HOMER_LIST=ALL is equivalent to making a complete list consisting of all possible addresses (1 through 20). The search procedure is lengthy but it will find all available Homers.
An example of a HomerList.cfg is given below. Lines starting with a semicolon are ignored. To create your own file, you may copy the code block below (the first two lines are sufficient) and use it as a template.
[HomerList]
HOMER_LIST=1 4
; ========================== NOTES =================================
; This file is relevant only for CAN bus communication interface.
; Default is used in case of absent or invalid lines.
; The default is as follows:
; HOMER_LIST=1 Addresses of Homers searched for on CAN bus.
; The address values can be 1 to 20, separated by spaces or tabs.
; Example: HOMER_LIST=2 15 4 1
; To save time at program start, set the list to reflect exactly
; the Homers available on the CAN bus.
; HOMER_LIST=ALL launches search for all possible Homers (1 to 20).
HomSoft tries to establish communication with all listed Homers one by one, starting with the first address in the list (a transient message titled Establishing Communication appears). The first Homer detected is a “flagship”, determining the baudrate. The remaining Homers will be checked only at this baudrate (a transient message Checking Communication).
The detected Homers will be assigned sequence numbers (1, 2, ...).
HomSoft can control and show data for only one Homer at a time (we will refer to it as the Selected Homer). After the initial search for available Homers, HomSoft designates one of them as the Selected: either the Homer assigned the sequential number 1, or the one specified in the Ini File. The Selected Homer will be identified in the title bar of the main HomSoft window. For example:
HomSoft for HOMER Autotuners (CAN) V5.0.2.0. HOMER #1 of 2, Addr=4
MultiCAN Window
Commands related to MultiCAN are grouped in the MultiCAN window (Fig. 57). The window can be opened by clicking the Homer|MultiCAN menu item. This menu item is only visible when the CAN Bus is used and more than one Homer is detected.
Fig. 57. An example of MultiCAN window with two Homers connected. Homer CAN Addresses are 1 and 4, respectively.
At the bottom of the MultiCAN window is a table listing all recognized Homers, including their CAN Addresses (column Addr), identities (Device), internal firmware versions (SW), Running state (Run), and Autotuning state (Tune). Note that Tune is effective only if Run = YES. The currently selected Homer is labeled “Sel” in the leftmost column.
The top of the MultiCAN window comprises buttons related to MultiCAN operations.
Selecting a Homer
There are several options to decide which of the detected Homers will become the Selected Homer, i.e., the one to be controlled and monitored by HomSoft:
-
Double-clicking the leftmost column of the row corresponding to the desired Homer.
-
Clicking the button opens a dialog to choose the number (column #) of the Selected Homer.
-
Clicking the button decrements the Selected Homer.
-
Clicking the button increments the Selected Homer.
All Homers will be temporarily stopped during the switching procedure. After the procedure is complete, all program windows will be adjusted according to the new Selected Homer settings. The Running and Sending states of all Homers will then be restored.
Settings for each particular Homer can be configured individually. If the HomSoft Ini File does not exist (e.g., HomSoft is run for the very first time), all Homers are set according to their individual internal Hom.cfg and Tun.cfg files (see Homer Analyzer Starting Parameters and Homer Autotuner Starting Parameters). On HomSoft termination, settings of all Homers (possibly changed while running the program) will be stored in the HomSoft Ini File and will be used again when the program is restarted.
Refresh
This button refreshes the table Run and Tune settings for all detected (i.e., listed) Homers.
Start All
This button starts all detected Homers (setting Run to YES). They resume measurement, data transmission, and, if Tune = YES, autotuning.
Stop All
This button stops all detected Homers. Stopped Homers will not measure, tune, or send data; they will only listen for commands.
Blind Stop
This button sends stop commands to all potentially possible Homers (i.e., CAN Addresses 1 to 20) without waiting for responses.
Homers may be active on the CAN Bus without being detected by HomSoft (if you choose not to include them in the HOMER_LIST statement of the HomerList.cfg file. For instance, you may wish to work with only some of them and keep the rest idle. The undetected Homers may be overloading the CAN Bus with unwanted messages, thus slowing or impairing the communication with the detected Homers. Obviously, an effective way to resolve this problem is to switch off their power supplies or to disconnect them from the CAN Bus. But this may sometimes not be practical.
Tune All
This button sets Tune = YES to all detected Homers, i.e., starts autotuning for all of them (effective only if Run = YES).
Tune None
This button sets Tune = NO to all detected Homers, i.e., stops autotuning for all of them.
Home All
This button commands all detected Homers to execute the All Stubs Home procedure.
Copy To All
This button copies the settings of the currently Selected Homer to all detected Homers. This way, you do not have to configure each Homer individually.
Reload All
This button blind-stops all Homers, then re-reads the scratch settings of all detected Homers (and sets the Homers accordingly). The procedure consists of two steps:
-
Reading Homer power-up settings (to learn more about Homer power-up behavior, please refer to System Configuration Files section of Homer Internal Files).
-
Reading the HomSoft Ini File.
Write to Ini
This button writes current Run and Tune settings to the HomSoft Ini File.
MultiCAN Connection
An example of a connection of four Homers to a CAN Bus is shown in Fig. 58. The individual devices are wired to the main cable by simple Tee-connected branches. The branches should be as short as possible. The main cable is terminated at each of its extreme ends by a 120-W resistor. In this case, none of the connected devices must load the bus (please check by an ohm-meter that their inputs are high-resistance, not 120 W). Alternatively, a main cable end can be connected to one of the devices (in our example, for instance, to HOMER 1). In this case, the device must also load the bus by 120 W.
A single copy of HomSoft is running on the controller (PC), enabling the user to switch the display between the individual Homers.
Fig. 58. An example of a connection of four Homers to a CAN Bus.